package net.tycmc.cty.ctyms.timejob.iems.job;

import net.tycmc.cty.ctyms.timejob.common.DateControl;
import net.tycmc.cty.ctyms.timejob.iems.service.MtnFaultServcie;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * 定时作业，用于处理故障状态采集信息
 * @author fengjie
 *
 */
public class MtnRemindJob extends QuartzJobBean {
	
	private MtnFaultServcie jobData;

	public MtnFaultServcie getJobData() {
		return jobData;
	}

	public void setJobData(MtnFaultServcie jobData) {
		this.jobData = jobData;
	}
	/**
	 * 每一小时执行一次
	 */
	@Override
	protected void executeInternal(JobExecutionContext arg0)
			throws JobExecutionException {
		System.out.println(DateControl.getDateTime(0)+"保养计划提醒Job开始");
		long startMili_t=System.currentTimeMillis();// 当前时间对应的毫秒数
		//保养提醒
		this.jobData.calMaintForstHandle();
		long endMili_t=System.currentTimeMillis();
		System.out.println(DateControl.getDateTime(0)+"保养计划提醒Job结束，用时："+(endMili_t-startMili_t)+"  毫秒");
	}

}

